package org.dreamwork.cai.core.impl;

import org.dreamwork.injection.IObjectCreateFactory;
import org.dreamwork.cai.proxy.RemoteProxyHandler;
import org.dreamwork.cai.srf.ServiceRouteItem;

public class SRIObjectFactory implements IObjectCreateFactory {
    private final ServiceRouteItem sri;

    public SRIObjectFactory (ServiceRouteItem sri) {
        this.sri = sri;
    }

    @Override
    public Object create (Class<?>... interfaces) {
        return RemoteProxyHandler.create (sri, interfaces);
    }
}